<!DOCTYPE html>
<meta charset="UTF-8">
<div style="padding: 10px; height: 400px;">
	<table data-type="grid" title="自定义单元格"
		data-defs="fit:true,border:true,ptborder:false,
				singleSelect: true,
				iconCls: 'icon-save',
				method:'get',url: 'demo/testdata/grid_data1.json',fit:true,fitColumns:true
			">
		<thead>
			<tr>
				<th data-defs="field:'itemid',width:80">ID</th>
				<th data-defs="field:'productid',width:200">产品名称</th>
				<th data-defs="field:'listprice',width:80,align:'right',styler:cellStyler">成本</th>
				<th data-defs="field:'unitcost',width:80,align:'right'">单价</th>
				<th data-defs="field:'attr1',width:100">属性</th>
				<th data-defs="field:'status',width:60,align:'center'">状态</th>
			</tr>
		</thead>
	</table>
</div>
<script type="text/javascript">
	function cellStyler(value, row, index) {
	    if (value < 300) {
		    return 'color:red;';
	    }
    }
</script>
